<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
	<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
	<script type="text/javascript" src="../deploy/js/vcol.js"></script> 
	<link rel="stylesheet" href="../deploy/themes/vcol/vcol.css" />
	<title>表格</title>
	</head>
<body>
	<div id="griddemo"></div>
	<div id="console"></div>
<script type="text/javascript">
	//初始化
	var griddemo = new Grid({
		id:"griddemo",
		columns:[
			{field:'NAME',header:"姓名"},
			{field:'CODE',header:"代码"},
			{field:'EMAIL',header:"电子邮箱"},
			{field:'SALARY',header:"薪资"},
			{field:'JOINDATE',header:"入职日期"}
		],
		height:200,
		onRowclick:function(e,data){
			Vcol.get("console").innerHTML="选中行ID:"+data.rowdata.ID;
		}
	});
	//手动加载数据
	griddemo.loadData({"total":32,rows:[
{"ID":"1","NAME":"名称1","CODE":"编码1","EMAIL":"a@b.com","SALARY":"10000","JOINDATE":"2002-10-01"},
{"ID":"2","NAME":"名称2","CODE":"编码2","EMAIL":"a@b1.com","SALARY":"11000","JOINDATE":"2003-10-01"},
{"ID":"3","NAME":"名称3","CODE":"编码3","EMAIL":"a@b3.com","SALARY":"13000","JOINDATE":"2002-10-03"},
{"ID":"4","NAME":"名称4","CODE":"编码4","EMAIL":"a@b4.com","SALARY":"14000","JOINDATE":"2004-10-01"},
{"ID":"5","NAME":"名称5","CODE":"编码5","EMAIL":"a@b5.com","SALARY":"10500","JOINDATE":"2005-10-01"},
{"ID":"6","NAME":"名称6","CODE":"编码6","EMAIL":"a@b6.com","SALARY":"10600","JOINDATE":"2006-10-01"},
{"ID":"7","NAME":"名称7","CODE":"编码7","EMAIL":"a@b7.com","SALARY":"10700","JOINDATE":"2007-10-01"},
{"ID":"8","NAME":"名称8。","CODE":"编码78","EMAIL":"a@b8.com","SALARY":"18700","JOINDATE":"2008-10-01"},
{"ID":"9","NAME":"名称9","CODE":"编码9","EMAIL":"9@b9.com","SALARY":"19700","JOINDATE":"2009-10-01"},
{"ID":"10","NAME":"名称10","CODE":"编码10","EMAIL":"1a@b7.com","SALARY":"20700","JOINDATE":"2004-10-01"},
]});
	


</script>
<a href="###" id="btnlogin" onclick="foo()" >点击登录</a>
<script type="text/javascript">
	function foo(){
		var evt= window.event?window.event:arguments.callee.arguments[0];//获取event对象
		var src= evt.srcElement||evt.target;//获取触发事件的DOM A#btnlogin 
	}
	$("#btnlogin").click(function(e,data){
		//e 为event对象
		//data为事件参数
	});
	
</script>
</body>
</html>